<div id="app" v-cloak>
    <div class="padding20">
        <el-form :model="form" label-width="auto" style="max-width: 600px">
            <el-form-item label="分组名称">
                <el-input v-model="form.name" />
            </el-form-item>
            <el-form-item label="上级" v-if="form.id!=1">
                <el-tree-select
                        v-model="form.pid"
                        :data="allList"
                        check-strictly
                        :render-after-expand="false"
                        style="width: 240px"
                />
            </el-form-item>
            <el-form-item label="权限" v-if="form.id!=1">
                <mu-tree-input v-model="form.rules" :data="allMenu" :prop="props" key-field="id"></mu-tree-input>
            </el-form-item>
            <el-form-item label="状态" v-if="form.id!=1">
                <el-switch
                        v-model="form.status"
                        :active-value="1"
                        :inactive-value="0"

                />
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="onEditSubmit(form)">提交</el-button>
                <el-button @click="common.cancel()">取消</el-button>
            </el-form-item>
        </el-form>
    </div>
</div>